package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.reggie.dto.DishDto;
import com.itheima.reggie.pojo.Dish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DishMapper extends BaseMapper<Dish> {

    /**
     * 查询菜品和口味的数据
     * @return
     */
    DishDto findByIdWithDishAndDishFlavor(Long id);


    Page<DishDto> findDishAndCategoryName(Page<DishDto> page,String name);

    List<DishDto> selectByDto(Dish dish);
}
